<?php
	require_once("pub.php");
	require_once(_ROOT."/db.php");
	require_once(_ROOT."/am/title.php");
?>
<?php
	$var_mgr_type = $_REQUEST['mgr_type'];
	$var_mgr_op   = $_REQUEST['mgr_op'];
	
	//echo 'mgrProcess.php::$var_mgr_op='.$var_mgr_op.' $var_mgr_type='.$var_mgr_type.'<br />';
	
	// 根据 操作op 和 类型type 进行相应的转向操作 
	if (($var_mgr_op!='') and ($var_mgr_type!=''))
	{
		if ($var_mgr_op=='0')
		{
			if ($var_mgr_type=='0')
			{
				// 转向到 add title
				$var_mark = getMark();
				//echo 'add title<br />';
				echo "<script language=javascript>location.href(\"$var_local/am/addTitle.php\");</script>";
			}
			else if($var_mgr_type=='1')
			{
				// 转向到 add content
				$var_mark = getMark();
				//echo 'add content';
				echo "<script language=javascript>location.href(\"$var_local/am/addContent.php\");</script>";
			}
			else
			{
				echo 'error! 0?';			
			}
		}
		else if($var_mgr_op=='1')
		{
			if ($var_mgr_type=='0')
			{
				// 转向到 update title
				$var_mark = getMark();
				//echo 'update title';
				echo "<script language=javascript>location.href(\"$var_local/am/titlesMgr.php?ID=$var_mark\");</script>";
			}
			else if($var_mgr_type=='1')
			{
				// 转向到 update content
				$var_mark = getMark();
				//echo 'update content';
				echo "<script language=javascript>location.href(\"$var_local/am/papersMgr.php?ID=$var_mark\");</script>";
			}	
			else
			{
				echo 'error! 1?';			
			}		
		}
		else if($var_mgr_op=='2')
		{
			if ($var_mgr_type=='0')
			{
				// 转向到 delete title
				$var_mark = getMark();
				echo 'delete title';
				//header("http://".$var_local"/am/delTitle.php?".$var_mgr_op."&type=".$var_mgr_type."&mark=".$var_mark."");	
			}
			else if($var_mgr_type=='1')
			{
				// 转向到 delete content
				$var_mark = getMark();
				echo 'delete content';
				//header("http://".$var_local"/am/delContent.php?".$var_mgr_op."&type=".$var_mgr_type."&mark=".$var_mark."");
			}
			else
			{
				echo 'error! 2?';			
			}		
		}			
	}
	else
	{
		echo 'mgrProcess error! '.
		' $var_mgr_op='.$var_mgr_op.' $var_mgr_type='.$var_mgr_type.'<br />';	
	}
?>
<?php
	require_once(_ROOT."/am/bottom.php");
?>